<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%
	pageContext.setAttribute("PATH",request.getContextPath());

 %>
	<!-- 引入在线的jQuery -->
  <!--  <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> -->
   <script>
   	//删除留言的跳转
   	function deleteConcat(id){
   		if(confirm("确认要删除id为"+id+"吗？")){
   			location.href="${PATH}/deleteContact.do?id="+id;
   			 alert(massage); 
   		}
   	}
   
   </script>
	
	
    <!-- 引入bootstrapcss与js -->
   <%-- <link rel="stylesheet" href="${PATH}/css/bootstrap.min.css">
	<script type="text/javascript" src="${PATH}/js/bootstrap.min.js"></script> --%>
	
	
  	
  
  <!-- 搭建主页面显示 -->
  <div><!--  class="container" -->
  	<!-- 标题行 -->
    			<h3><span class="label label-info ">无锡爱力思国际贸易有限公司</span></h3>
    	
    	<!-- 员工展示列表 -->
     <table class="table table-striped table table-hover">
       <tr>
	       <th>ID</th>
	       <th>姓名</th>
	       <th>邮箱</th>
	       <th>留言</th>  
	       <th>操作</th>  
    		
       </tr>
        <c:forEach items="${allcontact}" var="list">
            <tr>
           	 	<td>${list.id}</td>
           	 	<td>${list.name}</td>
           	 	<td>${list.email}</td>
           	 	<td>${list.details}</td>
           	 	<td>
           	 		<div class="row">
			    		<div class="col-md-4 col-md-offset-0">
			    			<button type="button" class="btn btn-danger" onclick="deleteConcat(${list.id})">
			    				<span class="glyphicon glyphicon-trash"></span>
			    					删除
			    			</button>
	    				</div>
    				</div>
           	 	</td>
           	 </tr>
        </c:forEach>
        
     </table>
    		
    </div>		
